package com.zhs.smartmall.order.feign;

import com.zhs.smartmallcommon.Enum.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * feignClient，调用远程客户端
 * 参数为被调用服务的名称
 */
@FeignClient("smartmall-product")
public interface ProductFeignService {

    /**
     * 这边的服务调用这个方法时，实际上是调用商品服务中的这个方法
     * @param currentPage
     * @param pageSize
     * @return
     */
    @RequestMapping("pms/attr/getByPage")
    R getListByPage(
            @RequestParam(value = "currentPage", required = false, defaultValue = "1")Integer currentPage,
            @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize);
}
